package com.zuihai.app.mvp.contract;

import android.app.Activity;

import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;
import com.zuihai.app.mvp.model.entity.AliPayResponse;
import com.zuihai.app.mvp.model.entity.BaseMainClass;
import com.zuihai.app.mvp.model.entity.MessageResponse;
import com.zuihai.app.mvp.model.entity.WXPayResponse;
import com.tbruyelle.rxpermissions.RxPermissions;

import rx.Observable;

/**
 * Created by Administrator on 2017/6/6 0006.
 */

public interface DetailRecommendContract {
    //对于经常使用的关于UI的方法可以定义到BaseView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {
        RxPermissions getPermissions();
        void setPrice(String price);
        void loading();
        void dismiss();
        void recommentSuccess();
        Activity getActivity();
        RxPermissions getPermisition();
        void clear();
        void showErrorDialog(String message);
    }

    //Model层定义接口,外部只需关心model返回的数据,无需关心内部细节,及是否使用缓存
    interface Model extends IModel {
        Observable<MessageResponse> recommentOrder(String type,String id, String userId,
                                                   int recomentDay, int favourCount, double favourMoney, int shareCount,
                                                   double shareMoney,double tuijianPrice,int threePay,int threeType);

        /**
         * 微信推荐支付
         * @param orderContent
         * @param price
         * @return
         */
        Observable<WXPayResponse> requestWechatBuyPayTuijian(String orderContent, String price,String type,String id, String userId,
                                                             int recomentDay, int favourCount, double favourMoney, int shareCount,
                                                             double shareMoney,double tuijianPrice,int threePay,int threeType);

        /**
         * 支付宝推荐支付
         * @param orderContent
         * @param price
         * @param orderName
         * @return
         */
        Observable<AliPayResponse> requestAliBuyPayTuijian(String orderContent, String price, String orderName,String type,String id, String userId,
                                                           int recomentDay, int favourCount, double favourMoney, int shareCount,
                                                           double shareMoney,double tuijianPrice,int threePay,int threeType);

        /**
         * 微信支付
         * @param orderContent
         * @param price
         * @return
         */
        Observable<WXPayResponse> requestWechatPay(String orderContent, String price);


        /**
         * 支付宝支付
         * @param orderContent
         * @param price
         * @param orderName
         * @return
         */
        Observable<AliPayResponse> requestAliPay(String orderContent, String price, String orderName);


        /**
         * 钱包支付
         * @return
         */
        Observable<BaseMainClass> walletPay(String myId, String friendId, String _price,String buyName,String type);


        Observable<BaseMainClass> tuijianPrice();
    }
}